RATA: Rapid Atomic Type Analysis by Abstract Interpretation - Application to JavaScript Optimization
نویسندگان
چکیده
We introduce RATA, a static analysis based on abstract interpretation for the rapid inference of atomic types in JavaScript programs. RATA enables aggressive type specialization optimizations in dynamic languages. RATA is a combination of an interval analysis (to determine the range of variables), a kind analysis (to determine if a variable may assume fractional values, or NaN), and a variation analysis (to relate the values of variables). The combination of those three analyses allows our compiler to specialize Float64 variables (the only numerical type in JavaScript) to Int32 variables, providing large performance improvements (up to 7.7×) in some of our benchmarks.
منابع مشابه
An Analytic Framework for JavaScript
As the programming language of the web, JavaScript deserves a principled yet robust framework for static analysis. To achieve both aims simultaneously, we start from an established reduction semantics for JavaScript and systematically derive its intensional abstract interpretation. Our first step is to transform the semantics into an equivalent low-level abstract machine: the JavaScript Abstrac...
متن کاملPushdown Abstractions of JavaScript
We design a family of program analyses for JavaScript that make no approximation in matching calls with returns, exceptions with handlers, and breaks with labels. We do so by starting from an established reduction semantics for JavaScript and systematically deriving its intensional abstract interpretation. Our first step is to transform the semantics into an equivalent low-level abstract machin...
متن کاملType Analysis for JavaScript
JavaScript is the main scripting language for Web browsers, and it is essential to modernWeb applications. Programmers have started using it for writing complex applications, but there is still little tool support available during development. We present a static program analysis infrastructure that can infer detailed and sound type information for JavaScript programs using abstract interpretat...
متن کاملJSAI: Designing a Sound, Configurable, and Efficient Static Analyzer for JavaScript
We describe JSAI, an abstract interpreter for JavaScript. JSAI uses novel abstract domains to compute a reduced product of type inference, pointer analysis, string analysis, integer and boolean constant propagation, and control-flow analysis. In addition, JSAI allows for analysis control-flow sensitivity (i.e., context-, path-, and heap-sensitivity) to be modularly configured without requiring ...
متن کاملIEEE754 Floating Point Bound Intervals for static analysis of JavaScript Programs
This paper extends our previous work on static analysis of JavaScript applications using an extended domain of intervals. The prior work uses integers as bounds of intervals, which leads to loss of precision. In this work, we use floating point numbers as bounds and design correct abstract operations on intervals that safely approximate concrete operations. We have also designed abstract functi...
متن کامل